package com.example.tester.enumable;


/**
 * @author lzh
 * @date 2019/9/10 - 14:06
 */
public enum Status {
    /**
     * 200
     */
    SUCCESS(200, "OK"),
    /**
     * 400
     */
    BAD_REQUEST(400, "Bad Request"),
    /**
     * 404
     */
    NOT_FOUND(404, "Not Found"),
    /**
     * 500
     */
    INTERNAL_SERVER_ERROR(500, "Unknown Internal Error"),

    NOT_VALID_PARAM(40005, "Not valid Params"),
    NOT_SUPPORTED_OPERATION(40006, "Operation not supported"),
    NOT_LOGIN(50000, "Not Login");

    private int code;
    private String standardMessage;

    Status(int code, String standardMessage) {
        this.code = code;
        this.standardMessage = standardMessage;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getStandardMessage() {
        return standardMessage;
    }

    public void setStandardMessage(String standardMessage) {
        this.standardMessage = standardMessage;
    }
}
